/**
 * Created by Ysssssss on 21/1/18.
 */

import { message } from "antd";

export default function notify (text, type, duration) {
    switch (type) {
        case 'success':
        case 'warn':
        case 'info':
            message[type](text, (duration || 1500)/1000)
            break
        case 'error':
            message[type](text, (duration || 3000)/1000)
            break
        default:
            message.error(text, (duration || 1500)/1000)

    }
}